





























/etc/apache2/httpd.conf
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
打開
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
打開
vi /etc/apache2/extra/httpd-vhosts.conf
新增以下
ServerAdmin yyy@gmail.com
DocumentRoot "/Library/WebServer/Documents/xxx"
ServerName xxx.localhost
ErrorLog "/private/var/log/apache2/xxx_error.log"
CustomLog "/private/var/log/apache2/xxx_access.log" common
vi /etc/hosts
新增以下
127.0.0.1 xxx.localhost
http://xxx.localhost/pub/js/fun.js
就可以連了











想對外分享這則貼文嗎?運用網址更方便呦~